import request from "@/util/request";

export const getEbookListByPage = (params: any) => {
  return request({
    url: "/api/category/getEbookListByPage",
    method: "get",
    params: params,
  });
};

export const getCategoryAllList = () => {
  return request({
    url: "/api/category/allList",
    method: "get",
  });
};

export const removeCate = (id: number) => {
  return request({
    url: "/api/category/remove",
    method: "delete",
    params: {
      id,
    },
  });
};

export const editCate = (cate: any) => {
  return request({
    url: "/api/category/save",
    method: "post",
    data: cate,
  });
};
